<%inherit file="/base.html"/>

<%def name="extra_css()">
	<link rel="stylesheet" type="text/css" href="${url('/css/worktime.css')}"/>
</%def>

<%def name="main_heading()">${c.office}</%def>

<%def name="content()">

<table class="grid-table">
	<tr>
		<td class="top-aligned half-width">
			<ul class="worktime-years">
				% for year, timesheets in c.years:
				<li>
					<h3>${year}</h3>
					<ul class="worktime-months">
						% for timesheet in timesheets:
						<li><a href="${url(controller='worktime/timesheet', action='index', relation='timesheet', id=timesheet.id)}">
							${h.month_name(timesheet.month, width='wide')}
						</a></li>
						% endfor
					</ul>
				</li>
				% endfor
			</ul>
		</td>
		<td class="top-aligned half-width">
			<form action="${url.current(action='generate')}" method="post">
				<table class="form-table">
					<tr>
						<th>${_('Year')}:</th>
						<td>${h.select_timesheet_year()}</td>
					</tr>
					<tr>
						<th>${_('Month')}:</th>
						<td>${h.select_month('month', 1)}</td>
					</tr>
				</table>
				<p align="center"><input class="submit-button big" type="submit" value="${_('Generate')}"/></p>
			</form>
		</td>
	</tr>
</table>

</%def>